<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>园区在孵企业详细信息</title>
<%@ include file="/common/meta.jsp"%>
<script type="text/javascript" src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="${res}/js/validate/irisvalidator.js"></script>
<script type="text/javascript" src="${res}/js/autodisckey/autodisckey.js"></script>

<style type="text/css">
	.input_width { width:130px }
	.select_width { width:143px }
	.table_td td {border:0}
	.long_input{ width:642px }
    .selectWidth4{width:646px;}
</style>
<script type="text/javascript">
var type = "${param.type}";
var parentTable = parent.$("#"+"${param.parentTab}");	//父页面的表格
var selectRadio = $();									//父页面选中的单选框
var selectTr = $();										//父页面选中的行

if(type=="edit") {
	selectRadio = parentTable.find(":radio:checked");
	selectTr = selectRadio.parents("tr");
}

$(function(){
	$("#fragment-tab1 :text,#fragment-tab1 [type='date']").addClass("input_width");
	$("#fragment-tab1 select").addClass("select_width");
	
	var submitpsn=selectTr.find("[name$='submit_psn']");//标示是否是申报人
	
	if(type=="edit"){
		
		$("input:not(:radio:button),textarea,span").each(function(){

			var id=$(this).attr("name");
			if(id==null || id=="")
				return true;
			
			var parentObj=selectTr.find("[name$='/"+id+"']");
			var value="";
			if(parentObj.is("span"))
				value=parentObj.text();
			else
				value=parentObj.val();
			//if($(this).is("input"))//初始化input框 不包括radio
				$(this).html(value);
		});
		
		$(":radio").each(function(){//初始化radio框
			var name=$(this).attr("name");
		
			
			var value=$("[name='"+name+"_value']").val();
			if($(this).val()==value)
				$(this).attr("checked",true);
			
		});
		
		changeCardType();
		
		//if(submitpsn.length>0 && submitpsn.val()=="1"){//如果是申报人
			$("input,select").each(function(){
				if(!$(this).attr("class")||$(this).attr("class").indexOf("notdisabled")==-1)
					$(this).attr("disabled","true");
			});
			$("a,img").removeAttr("onclick");
			$(".color_red").css("display","none");
			$("img").css("display","none");
			if(parent.thickbox_title)
				parent.$("#TB_ajaxWindowTitle").html(parent.thickbox_title);
			else
			parent.$("#TB_ajaxWindowTitle").html("园区在孵企业详细信息");
		//}
		
	}
});

function loadAjaxSelect(selectId,url,params,varParm){
	$.ajax( {
		url : url,
		type : 'post',
		dataType:'json',
		data : params,
		success : function(data) {
			
			for(var i=0;i<data.length;i++){
				var value=data[i].id;
				var text=data[i].name;		
				$("#"+selectId).append("<option value='"+value+"'>"+text+"</option>");
				

			}
			if(type=="edit"){//如果是修改，才需要初始化select框的值
				var selectValue=$("[name='"+selectId+"_value']").val();
				$("#"+selectId+" option").each(function(i,obj){
					if($(obj).val()==selectValue){
						setTimeout(function() {
							$(obj).attr("selected",true);
						}, 1);
					}
				});
			}
			
			
		}
	});
	}

function setDegree(){
	
	var degreeText=$("#degree").children("option").filter(":selected").text();

	if(degreeText=="博士"){
		$("#degree_country_required").show();
		$("#degree_year_required").show();
		var itemClass=$("#degree_country").attr("class");
		if(itemClass.indexOf("required")==-1)
			$("#degree_country").attr("class",$("#degree_country").attr("class")+" required");
		
		itemClass=$("#degree_year").attr("class");
		if(itemClass.indexOf("required")==-1)
			$("#degree_year").attr("class",$("#degree_year").attr("class")+" required");
	}else{//关闭最高学位验证
		$("#degree_country_required").hide();
		$("#degree_year_required").hide();
		$("#degree_country").attr("class",$("#degree_country").attr("class").replace("required",""));
		$("#degree_year").attr("class",$("#degree_year").attr("class").replace("required",""));
	}
}

function changeCardType(){
	var cardTypeObj = $("[name='card_type_value']");
	var cardCodeObj = $("[name='card_code']");
	
	if(cardTypeObj.val()=="1"){
		cardCodeObj.addClass("idCard");
		cardCodeObj.attr("label","身份证");
	} else {
		cardCodeObj.removeClass("idCard");
		cardCodeObj.attr("label","证件号码");
	}
}


</script>

</head>
<body style="overflow-x:hidden;overflow-y:auto;">

	<div id="tabnav">  
		<ul>
			<li class="down" id="tab1" onclick="changeTab(this.id)">
					<a href="###"><span>园区在孵企业详细信息</span></a>
			</li>
		</ul>
	</div>
	
	<div class="table01 t_css" id="fragment-tab1">
		<table class="t_css" style="width:100%" border="0" cellpadding="0" label="园区在孵企业详细信息" cellspacing="1">
		<col style="width:20%"/>
		<col style="width:30%"/>
		<col style="width:20%"/>
		<col style="width:30%"/>
		
	<tr class="li_1">
		<td align="right" ><span  class="color_red">*</span>企业名称：</td>
		<td colspan="3"><span  name="company_name"></span></td>
	</tr>
	
	<tr class="li_2">
		<td align="right" ><span  class="color_red">*</span>核心技术：</td>
		<td><span  name="core_technology"></span></td>
		
		<td align="right" ><span  class="color_red">*</span>专业领域：</td>
		<td><span name="professional_field"></span></td>
	</tr>

	<tr  class="li_1">
	  <td align="right" ><span  class="color_red">*</span>注册地：</td>
		<td><span  name="registration_area"></span></td>
		
		<td align="right" ><span  class="color_red">*</span>注册时间：</td>
		<td align="center"><span  name="content1" ></span>
		</td>
	</tr>
	
	<tr   class="li_2">
		<td align="right"><span  class="color_red">*</span>入驻时间：</td>
		<td align="center"><span  name="content2" ></span>
		</td>
		
		<td align="right"><span  class="color_red">*</span>注册资金（万元）：</td>
		<td align="center"><span name="content3"></span></td>
	</tr>
	
	
	
	
	<tr   class="li_1">
		<td align="right"><span  class="color_red">*</span>孵化面积（平方米）：</td>
		<td align="center"><span name="content4"></span></td>
		
		<td align="right" ><span  class="color_red">*</span>企业负责人：</td>
		<td><span name="content5"></span></td>
	</tr>
	
	
	
	<tr   class="li_2">
		<td align="right"><span  class="color_red">*</span>营业收入（万元）：</td>
		<td align="center"><span name="content6"></span></td>
		
		<td align="right"><span  class="color_red">*</span>年末员工数(人）：</td>
		<td align="center"><span name="content7"></span></td>
	</tr>
	
	</table>
	</div>
	
	<table width="100%" align="center">
		<tr>
			<td>
				&nbsp;<input type="button" id="cancel" class="button_01 notdisabled" value="关闭" onclick="parent.tb_remove();">
			</td>
		</tr>
	</table>
	<br />

</body>
</html>